﻿package mortal.game.view.copy.sixBoss.renderer
{
    import com.mui.controls.*;
    import com.mui.utils.*;
    import extend.language.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.item.*;
    import mortal.game.view.copy.sixBoss.data.*;

    public class SixBossOutPutInfoRenderer extends GCellRenderer
    {
        private var _roleName:GTextFiled;
        private var _item:BaseItem;
        private var _itemNum:GTextFiled;
        private var _outPutRewardInfo:SixBossOutPutRewardInfo;

        public function SixBossOutPutInfoRenderer()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.AutoArena_Light, 0, 0, this));
            this._roleName = UIFactory.gTextField("", 26, 3, 94, 20, this, GlobalStyle.textFormatBai);
            this._item = UICompomentPool.getUICompoment(BaseItem);
            this._item.setItemStyle(ItemStyleConst.Little, "", 2, 2);
            this._item.x = 117 + 3;
            this.addChild(this._item);
            this._itemNum = UIFactory.gTextField("", 117 + 36, 3, 20, 20, this);
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            this._outPutRewardInfo = param1 as SixBossOutPutRewardInfo;
            if (this._outPutRewardInfo)
            {
                switch(this._outPutRewardInfo.outPutIndex)
                {
                    case 1:
                    {
                        this._roleName.text = Language.getString(40907);
                        break;
                    }
                    case 2:
                    {
                        this._roleName.text = Language.getString(40908);
                        break;
                    }
                    case 3:
                    {
                        this._roleName.text = Language.getString(40909);
                        break;
                    }
                    case 4:
                    {
                        this._roleName.text = Language.getString(40910);
                        break;
                    }
                    case 5:
                    {
                        this._roleName.text = Language.getString(40911);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
                this._item.itemCode = this._outPutRewardInfo.itemCode;
                this._itemNum.text = "*" + this._outPutRewardInfo.itemAmount;
            }
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl();
            this._roleName.dispose();
            this._roleName = null;
            this._item.dispose();
            this._item = null;
            this._itemNum.dispose();
            this._itemNum = null;
            this._outPutRewardInfo = null;
            return;
        }// end function

    }
}
